#include "tableframe.h"
#include "ui_tableframe.h"

TableFrame::TableFrame(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::TableFrame)
{
    ui->setupUi(this);
    initwindow();

}

TableFrame::~TableFrame()
{
    delete ui;
}

void TableFrame::initwindow()
{
    ui->frame->setStyleSheet("QPushButton {\
                                       background-color: #87CEFA;\
                                       color: white;\
                                       border: none;\
                                       padding: 10px 10px;\
                                       font-size: 14px;\
                                       border-radius: 6px;\
                                   }\
                                   QPushButton:hover {\
                                       background-color: #778899;\
                                   }\
                                   QPushButton:pressed {\
                                       background-color: #20B2AA\
                                   }"
                                    );


}



void TableFrame::on_tablebutton1_clicked()
{
    QString tabletxt = static_cast<QPushButton*>(sender())->text();
    emit sendTableName(tabletxt);
}

void TableFrame::on_tablebutton2_clicked()
{
    QString tabletxt = static_cast<QPushButton*>(sender())->text();
    emit sendTableName(tabletxt);
}

void TableFrame::on_tablebutton3_clicked()
{
    QString tabletxt = static_cast<QPushButton*>(sender())->text();
    emit sendTableName(tabletxt);
}

void TableFrame::on_tablebutton4_clicked()
{
    QString tabletxt = static_cast<QPushButton*>(sender())->text();
    emit sendTableName(tabletxt);
}

void TableFrame::on_tablebutton5_clicked()
{
    QString tabletxt = static_cast<QPushButton*>(sender())->text();
    emit sendTableName(tabletxt);
}
void TableFrame::on_tablebutton6_clicked()
{
    QString tabletxt = static_cast<QPushButton*>(sender())->text();
    emit sendTableName(tabletxt);
}
void TableFrame::on_tablebutton7_clicked()
{
    QString tabletxt = static_cast<QPushButton*>(sender())->text();
    emit sendTableName(tabletxt);
}
void TableFrame::on_tablebutton8_clicked()
{
    QString tabletxt = static_cast<QPushButton*>(sender())->text();
    emit sendTableName(tabletxt);
}
void TableFrame::on_tablebutton9_clicked()
{
    QString tabletxt = static_cast<QPushButton*>(sender())->text();
    emit sendTableName(tabletxt);
}
void TableFrame::on_tablebutton10_clicked()
{
    QString tabletxt = static_cast<QPushButton*>(sender())->text();
    emit sendTableName(tabletxt);
}
void TableFrame::on_tablebutton11_clicked()
{
    QString tabletxt = static_cast<QPushButton*>(sender())->text();
    emit sendTableName(tabletxt);
}
void TableFrame::on_tablebutton12_clicked()
{
    QString tabletxt = static_cast<QPushButton*>(sender())->text();
    emit sendTableName(tabletxt);
}
void TableFrame::on_tablebutton13_clicked()
{
    QString tabletxt = static_cast<QPushButton*>(sender())->text();
    emit sendTableName(tabletxt);
}
void TableFrame::on_tablebutton14_clicked()
{
    QString tabletxt = static_cast<QPushButton*>(sender())->text();
    emit sendTableName(tabletxt);
}
void TableFrame::on_tablebutton15_clicked()
{
    QString tabletxt = static_cast<QPushButton*>(sender())->text();
    emit sendTableName(tabletxt);
}
